package cus1156.lab6;

import static org.junit.Assert.*;

import org.junit.Before;
import org.junit.Test;

public class CatListTest {
    private CatList list;
    
	@Before
	public void setUp() throws Exception {
		list = new CatList();
	}

	@Test
	public void testAddCat() {
		list.addCat(new Cat("Joe", "orange"));
		list.addCat(new Cat("Fluffy", "calico"));
		assertEquals(list.getCatAtPos(0).getName(), "Joe");
		assertEquals(list.getCatAtPos(1).getName(), "Fluffy");
	}

	@Test
	public void testHowManyCats() {
		list.addCat(new Cat());
		list.addCat(new Cat());
		assertEquals(list.howManyCats(),2);
		list.addCat(new Cat());
		assertEquals(list.howManyCats(),3);
	}

}
